# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=nullscan
pkgver=1.0.1
pkgrel=7
groups=('blackarch' 'blackarch-automation' 'blackarch-scanner' 'blackarch-recon'
        'blackarch-fingerprint' 'blackarch-networking' 'blackarch-fuzzer'
        'blackarch-exploitation')
pkgdesc='A modular framework designed to chain and automate security tests.'
arch=('any')
url='http://www.nullsecurity.net/tools/automation.html'
license=('MIT')
depends=('python' 'python-beautifulsoup4' 'python-colorama' 'python-dnspython'
         'python-get-mac' 'python-google' 'python-ipwhois' 'python-netaddr'
         'python-netifaces' 'python-psutil' 'python-python-libnmap'
         'python-python-whois' 'python-requests' 'nmap')
source=("https://github.com/nullsecuritynet/tools/raw/main/automation/nullscan/release/$pkgname-$pkgver.tar.gz")
sha512sums=('a4b160641eac5b01d8c475634983b4ebfb74a6e238deafec99c5173374ba8eeaab7469f0c5f24b3930d59b0747fe9d3088e4e2f4f900a399899e9b4637b7ba8e')

package() {
  cd "$pkgname-$pkgver"

  install -dm 755 "$pkgdir/usr/bin"
  install -dm 755 "$pkgdir/usr/share/$pkgname"

  cp -a src lists examples "$pkgdir/usr/share/$pkgname/"

  install -Dm 644 "conf/$pkgname.conf" "$pkgdir/etc/$pkgname.conf"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" \
    docs/{AUTHORS,ChangeLog,DESCR,*.txt,README,TESTED,THANKS,TODO}
  install -Dm 644 "docs/$pkgname.1" "$pkgdir/usr/share/man/man1/$pkgname.1"
  install -Dm 644 docs/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

  ln -sf "/usr/share/$pkgname/src/$pkgname.py" "$pkgdir/usr/bin/$pkgname"
}

